<style>
form#preporukaEdit{
	display:none;
	position:absolute;
	width:400px;
}
form#preporukaEdit a.moveBtn,
form#preporukaEdit a.closeBtn{
	display:block;
	float:right;
	width:12px;
	height:12px;
	text-indent:-100em;
	overflow:hidden;
}
form#preporukaEdit a.closeBtn{background:url(gui/close_12.gif) no-repeat center center; margin:-10px -10px 0px 0px;}
form#preporukaEdit a.moveBtn{background:url(gui/move_12.gif) no-repeat center center; margin:-10px 5px 0px 0px; cursor:move}
form#preporukaEdit input#naslov_edit{
	width:300px;
}
form#preporukaEdit textarea{
	width:300px;
	height:150px;
}
form#preporukaEdit input[type=submit]{
	background-image:url(gui/icons/save.gif);
	background-repeat:no-repeat;
	background-position: 3px center;
	padding-left:16px;
}
form#preporukaEdit h2{
	padding-left:20px;
	background-position:0px center;
	background-repeat:no-repeat;
}
form#preporukaEdit h2.izmena{background-image:url(gui/icons/edit.gif);}
form#preporukaEdit h2.nova{background-image:url(gui/icons/new.gif);}
form#preporukaEdit label{
	width:70px;
}
form#preporukaEdit label.required:before{
	content:"* ";
	font-weight:bolder;
	color:#f00;
}
form#preporukaEdit #preporukaNewFormFields label{
	width:85px;
}
form#preporukaEdit #preporukaNewFormFields input[type=text]{
	width:200px;
}
form#preporukaEdit #preporukaNewFormFields .info{
	display:block;
	float:left;
	font-size:10px;
	-moz-opacity:0.5;
	margin-top:8px;
}
form#preporukaEdit input[type=reset]{
	background-image:url(gui/icons/cancel.gif);
	background-repeat:no-repeat;
	background-position: 3px center;
	padding-left:16px;
}
form#preporukaEdit input[type=button].searchBtn{
	width:20px;
	height:20px;
	margin:5px 0px;
	cursor:pointer;
	background:url(gui/icons/search.gif) no-repeat center center;
	border:none;
}
</style>
<form id="preporukaEdit" class="area" action="javascript:void(0)" onsubmit="submitForm(this,'preporuke.php','POST','afterSavePrep',1)">
	<input type="hidden" name="new" value="0" />
	<input type="hidden" name="a" value="save" />
	<a title="zatvori" href="javascript:void(0)" onclick="this.parentNode.style.display='none'" class="closeBtn">close</a>
	<a title="pomeri" href="javascript:void(0)" onmousedown="startMoveIt(this,event)" onmouseup="stopMoveIt(this)" class="moveBtn">move</a>
	<h2 id="prepEditTitle">Izmena preporuke</h2>
	
	<span style="float:right">
		<label for="kontrola_chk">aktivna</label><input type="checkbox" name="kontrola" id="kontrola_chk" value="1" style="margin-top:8px;" />
	</span>
	<label class="required" for="skBtn">komitent:</label>
	<input type="text" name="komitent_edit" id="komitent_edit" disabled="disabled" />
	<input type="hidden" name="komitent_edit_id" id="komitent_edit_id"/>
	<input name="skBtn" id="skBtn" type="button" onclick="selectKomitent('komitent_edit','komitent_edit_id')" title="Nađi komitenta..." value="jik" class="searchBtn" /><br clear="all" />
	<label class="required" for="delatnost_edit">delatnost:</label>
	<select name="delatnost_edit" id="delatnost_edit" style="width:200px;" onfocus="var kid=document.getElementById('komitent_edit_id'); var novi=this.parentNode.new.value; if(kid.value>0 && novi=='1'){LoadRSDoc('preporuke.php?a=updateKomdels&id='+kid.value,'prepUpdateKomdels(\'delatnost_edit\')')}">
		<option value="-1">---</option>
		{{%loop start delatnost_id}}
		<option style="{{$delatnost_display}}" value="{{$delatnost_id}}" {{$delatnost_selected}}>{{$delatnost_ime}}</option>
		{{%loop end}}
	</select><br clear="all" />
	<label class="required" for="naslov_edit">naslov:</label><input type="text" name="naslov_edit" id="naslov_edit" value="" /><br clear="all" />
	<label class="required" for="tip_edit">tip:</label>
	<select name="tip_edit" id="tip_edit">
		{{%loop start filter_tip_id}}
		<option value="{{$filter_tip_id}}">{{$filter_tip_name}}</option>
		{{%loop end}}
	</select>
	<label class="required" for="tema_edit" style="width:auto; margin-left:10px;">tema:</label>
	<select name="tema_edit" id="tema_edit">
		{{%loop start filter_tema_id}}
		<option value="{{$filter_tema_id}}">{{$filter_tema_name}}</option>
		{{%loop end}}
	</select>
	<br clear="all" />
	<label class="required" for="text_edit">tekst:</label>
	<textarea name="text_edit" id="text_edit"></textarea>
	<input type="hidden" name="prep_id_edit" id="prep_id_edit" />
	<div id="preporukaNewFormFields">
		<label class="required" for="edit_ime">ime i prezime:</label><input type="text" name="edit_ime" id="edit_ime" /><br clear="all" />
		<label class="required" for="edit_mesto">mesto:</label><input type="text" name="edit_mesto" id="edit_mesto" /><br clear="all" />
		<label class="required" for="edit_adresa">ulica i broj:</label><input type="text" name="edit_adresa" id="edit_adresa" /><br clear="all" />
		<label class="required" for="edit_email">e-mail:</label><input type="text" name="edit_email" id="edit_email" rule="^.*?@.*?\..*?$" /><span class="info">username@host.com</span><br clear="all" />
		<label class="required" for="edit_telefon">telefon:</label><input type="text" name="edit_telefon" id="edit_telefon" rule="^(0{1}\d{2,3} \d{3} \d{2,4})*$|^(9\d{3})*$" /><span class="info">011 123 4567</span>
	</div>
	
	<br clear="all" />
	<input type="submit" value="sačuvaj izmene" class="save" />
	<input type="reset" value="poništi" class="cancel" />
</form>